window.addEvent('load',function()
{
    //斑马表
    var list=new ZebraTable(document.getElementById('List'));
    {
        list.Color_1='#ffffff';
        list.Color_2='#f6f6f6';
        list.Color_3='#ebeff9';
        list.Render('tbody');
    }
    list=null;

    //全选
    $$('#SelectAll').addEvent('click',function(){
        Checkbox.SelectAll('ID');
    });

    //全不选
    $$('#UnSelectAll').addEvent('click',function(){
        Checkbox.UnSelectAll('ID');
    });

    //删除
    $$('#Delete').addEvent('click',function()
    {
        if(Checkbox.IsChecked('ID'))
        {
            mconfirm
            (
                '你确认要删除吗？',
                function()
                {
			  $('Form1').action='list.action.batch_delete.php';
                    $('Form1').submit();
                },
                function()
                {

                }
            );
        }
        else
        {
            malert('请选择要删除的信息');
        }
    });
    
    //置顶
     $$('#IsTop').addEvent('click',function()
    {
        if(Checkbox.IsChecked('ID'))
        {
            mconfirm
            (
                '你确认要全部置顶吗？',
                function()
                {
			  $('Form1').action='list.action.batch_top.php';
                    $('Form1').submit();
                },
                function()
                {

                }
            );
        }
        else
        {
            malert('请选择要置顶的信息');
        }
    });
     //锁定
     $$('#Locked').addEvent('click',function()
    {
        if(Checkbox.IsChecked('ID'))
        {
            mconfirm
            (
                '你确认要全部锁定吗？',
                function()
                {
			  $('Form1').action='list.action.batch_locked.php';
                    $('Form1').submit();
                },
                function()
                {

                }
            );
        }
        else
        {
            malert('请选择要锁定的信息');
        }
    });
     //验证
     $$('#Email').addEvent('click',function()
    {
        if(Checkbox.IsChecked('ID'))
        {
            mconfirm
            (
                '你确认要全部通过Email验证吗？',
                function()
                {
			  $('Form1').action='list.action.batch_email.php';
                    $('Form1').submit();
                },
                function()
                {

                }
            );
        }
        else
        {
            malert('请选择要通过Email验证的信息');
        }
    });
     //诚信
     $$('#Integrity').addEvent('click',function()
    {
        if(Checkbox.IsChecked('ID'))
        {
            mconfirm
            (
                '你确认要全部变为诚信供应商吗？',
                function()
                {
			  $('Form1').action='list.action.batch_integrity.php';
                    $('Form1').submit();
                },
                function()
                {

                }
            );
        }
        else
        {
            malert('请选择要变为诚信供应商的信息');
        }
    });
      //vip
     $$('#Vip').addEvent('click',function()
    {
        if(Checkbox.IsChecked('ID'))
        {
            mconfirm
            (
                '你确认要全部变为VIP吗？',
                function()
                {
			  $('Form1').action='list.action.batch_vip.php';
                    $('Form1').submit();
                },
                function()
                {

                }
            );
        }
        else
        {
            malert('请选择要变为vip的信息');
        }
    });
});